﻿using System.Data;
using System;
using AChance.Bll.Func;
using AChance.Func;
using AChance.Dal.Entity;
using AChance.Dal.Func;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace AChance.Bll.Trans
{
    public partial class TrnBuilder
    {
        /// <summary>
        /// 查询开发单位
        /// </summary>
        [BllTrans]
        public partial class GetList
        {
            public class InData
            {
                [BllData(DispName = "开发单位查询条件", Need = true)]
                public FDWBDR BDR { get; set; }
                [BllData(DispName = "查询加工")]
                public DalQuery.Proc QueryProc { get; set; }
            }
            public class OutData
            {
                [BllData(DispName = "查询结果")]//BDR
                public DalQuery.Result QueryResult { get; set; }
            }
            public static void Exec(InData inData, OutData outData)
            {
                #region 数据准备
                #endregion

                #region 逻辑检查
                #endregion

                #region 操作执行
                //  var aaa = DalOper.Sql.Select("select * from fdworg");
                #endregion
            }
        }

        /// <summary>
        /// 新增开发单位
        /// </summary>
        [BllTrans(SqlOperMode = DalConst.SqlOperMode.None)]
        public partial class Add
        {
            public class InData
            {
                [BllData(DispName = "开发单位信息", Need = true)]
                public FDWBDR BDR { get; set; }
            }
            public class OutData
            {
                [BllData(DispName = "开发单位信息")]
                public FDWBDR BDR { get; set; }
            }
            public static void Exec(InData inData, OutData outData)
            {
                #region 数据准备
                //var fff = BllOper.Trans.Pkg.InData.GetValue("BDaR", null, "sdfasdfsa");
                #endregion

                #region 逻辑检查
                //if (DalOper.Sql.SelectExists<FDWBDR>(arg => arg.BDRNAME == inData.BDR.BDRNAME))
                //    throw new Exception(inData.BDR.BDRNAME + "名称已被使用");
                #endregion

                #region 操作执行
                //inData.BDR.BDRID = BllKey.Create<FDWBDR>();
                //DalOper.Sql.Insert(inData.BDR);
                // outData.BDR = inData.BDR;
                #endregion
            }
        }
    }
}
